{% extends 'index.html' %}
{% load i18n static %}
{% load site_base_tags %}
{% comment %}
This is where you can override the hero area block. You can simply modify the content below or replace it wholesale to meet your own needs. 
{% endcomment %}
{% block hero %}
    <div class="jumbotron">
        <div class="container">
            <h1>{{ custom_theme.jumbotron_welcome_title|default:_("Welcome") }}</h1>
            <p></p>
            <p>{{ custom_theme.jumbotron_welcome_content|default:_("GeoNode is an open source platform for sharing geospatial data and maps.") }}</p>
            {% if not custom_theme.jumbotron_cta_hide %}
                <p><a class="btn btn-default btn-lg" target="_blank"
                      href="{{ custom_theme.jumbotron_cta_link|default:_("https://docs.geonode.org/en/master/usage/index.html") }}"
                      role="button">{{ custom_theme.jumbotron_cta_text|default:_("Get Started &raquo;") }}</a></p>
            {% endif %}
        </div>
    </div>
{% endblock %}

  {% block mainbody %}

      {% block bigsearch %}
      {% if block.super %}
      {{ block.super }}
      {% else %}
      <div class="big-search">
      	<div class="container">
      		<h1>{% trans "Search for Data." %}</h1>
      		<div class="search">
      			<form id="search" action="{% url "search" %}" >
      				<span class="fa fa-search fa-3x"></span>
      				{% if HAYSTACK_SEARCH %}
      				<input id="search_input" type="text" placeholder="Search" class="form-control" name="q">
      				{% else %}
      				<input id="search_input" type="text" placeholder="Search" class="form-control" name="title__icontains">
      				{% endif %}
      			</form>
      		</div>
      		<p><a class="btn btn-default btn-lg" href="{% url "search" %}">Advanced Search</a></p>
      	</div>
      </div>
      {% endif %}
      {% endblock bigsearch %}

      {% block datasets %}
      {{ block.super }}
      {% endblock datasets %}

      {% block showcase %}
      <section id="showcase">
        <div class="row">
          <div class="container text-center">
            <h2>Featured Datasets</h2>
            <div class="row home-facets">
            {% with facet_type='home' %}
             {% site_facets as facets %}
              <div class="col-md-6">
                <p><a href="{% url "layer_browse" %}"><i class="fa fa-square-o fa-4x rotate-45"></i></a></p>
                <h2><a href="{% url "layer_browse" %}">{{ facets.layer|default:_("No") }} {% blocktrans count counter=facets.layer %}Layer{% plural %}Layers{% endblocktrans %}</a></h2>
                <p>{% trans "Click to search for geospatial data published by other users, organizations and public sources. Download data in standard formats." %}</p>
                {% if user.is_authenticated %}
                <p class="text-center"><a class="btn btn-default" href="{% url "layer_upload" %}" role="button">{% trans "Add layers" %} &raquo;</a></p>
                {% else %}
                <p class="text-center"><a class="btn btn-default" href="{% url "layer_browse" %}" role="button">{% trans "Explore layers" %} &raquo;</a></p>
                {% endif %}
              </div>
              <div class="col-md-6">
                <p><a href="{% url "maps_browse" %}"><i class="fa fa-map-marker fa-4x"></i></a></p>
                <h2><a href="{% url "maps_browse" %}">{{ facets.map|default:_("No") }} {% blocktrans count counter=facets.map %}Map{% plural %}Maps{% endblocktrans %}</a></h2>
                <p>{% trans "Data is available for browsing, aggregating and styling to generate maps which can be saved, downloaded, shared publicly or restricted to specify users only." %}</p>
                {% if user.is_authenticated %}
                <p><a class="btn btn-default" href="{% url "new_map" %}" role="button">{% trans "Create maps" %} &raquo;</a></p>
                {% else %}
                <p><a class="btn btn-default" href="{% url "maps_browse" %}" role="button">{% trans "Explore maps" %} &raquo;</a></p>
                {% endif %}
              </div>
              <div class="col-md-6">
                <p><a href="{% url "document_browse" %}"><i class="fa fa-newspaper-o fa-4x"></i></a></p>
                <h2><a href="{% url "document_browse" %}">{{ facets.document|default:_("No") }} {% blocktrans count counter=facets.document %}Document{% plural %}Documents{% endblocktrans %}</a></h2>
                <p>{% trans "As for the layers and maps GeoNode allows to publish tabular and text data, manage theirs metadata and associated documents." %}</p>
                {% if user.is_authenticated %}
                <p class="text-center"><a class="btn btn-default" href="{% url "document_browse" %}" role="button">{% trans "Add documents" %} &raquo;</a></p>
                {% else %}
                <p class="text-center"><a class="btn btn-default" href="{% url "document_browse" %}" role="button">{% trans "Explore documents" %} &raquo;</a></p>
                {% endif %}
              </div>
              <div class="col-md-6">
                <p><a href="{% url "profile_browse" %}"><i class="fa fa-user fa-4x"></i></a></p>
                <h2><a href="{% url "profile_browse" %}">{{ facets.user|default:_("No") }} {% blocktrans count counter=facets.user %}User{% plural %}Users{% endblocktrans %}</a></h2>
                <p>{% trans "Geonode allows registered users to easily upload geospatial data and various documents in several formats." %}</p>
                <p><a class="btn btn-default" href="{% url "profile_browse" %}" role="button">{% trans "See users" %} &raquo;</a></p>
              </div>
            {% endwith %}
            </div>
          </div>
        </div>
        <div class="row">
            <div class="container text-center">
                {% verbatim %}
                <div ng-app="featured">
                  <div ng-repeat="item in featured | limitTo:4">
                    <div class="col-md-3">
                      <a href="{{ item.detail_url }}"><img ng-src="{{ item.thumbnail_url }}" /></a>
                      <h4>{{ item.title | limitTo: 20 }}{{item.title.length > 20 ? '...' : ''}}</h4>
                    </div>
                  </div>
                </div>
          		{% endverbatim %}
                <p><a href="/search/">Explore all datasets</a></p>
            </div>
        </div>
      </section>
      {% endblock showcase %}
      {% block partners %}
        {% if custom_theme.partners.all %}
        <section id="partners">
        <div class="container text-center">
          <h2>{{ custom_theme.partners_title|default:_("Our partners") }}</h2>
          <div class="row">
              {% for partner in custom_theme.partners.all %}
              <div class="col-md-6">
                  <div class="partner_logo" style="background-image: url({% if partner.logo %}{{partner.logo.url}}{% else %}{% static 'geonode/img/missing_thumb.png' %}{% endif %})"></div>
                  <div><a href="{{ partner.partner_link }}" target="_blank">{{ partner.title }}</a></div>
              </div>
              {% endfor %}
          </div>
        </div>
        </section>
        {% endif %}
      {% endblock partners %}

  {% endblock mainbody %}